/*******************************************************************************
 * Size: 20 px
 * Bpp: 8
 * Opts: 
 ******************************************************************************/

#include "lvgl.h"

#ifndef FONT_MYAWESOME
#define FONT_MYAWESOME 1
#endif

#if FONT_MYAWESOME

/*-----------------
 *    BITMAPS
 *----------------*/

/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
    /* U+F043 "" */
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0x2d,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x3b, 0xff, 0xf1, 0x11, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0xa2, 0xff, 0xff, 0x69, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x11, 0xf4,
    0xff, 0xff, 0xcd, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x84, 0xff, 0xff, 0xff,
    0xff, 0x4a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x18, 0xf2, 0xff, 0xff, 0xff, 0xff, 0xcd,
    0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa3,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x6c, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x4e, 0xff, 0xff, 0xff,
    0xff, 0xff, 0xff, 0xff, 0xf3, 0x25, 0x0, 0x0,
    0x0, 0x18, 0xeb, 0xff, 0xff, 0xff, 0xff, 0xff,
    0xff, 0xff, 0xff, 0xcc, 0x5, 0x0, 0x0, 0xb1,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    0xff, 0xff, 0x7d, 0x0, 0x3c, 0xff, 0xff, 0xff,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    0xf2, 0x11, 0xa0, 0xff, 0xff, 0xff, 0xff, 0xff,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x65,
    0xe1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xa4, 0xf9, 0xff,
    0xa9, 0x6c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    0xff, 0xff, 0xff, 0xbc, 0xeb, 0xff, 0x97, 0x16,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    0xff, 0xad, 0xb8, 0xff, 0xe3, 0x7, 0x9c, 0xff,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7a,
    0x5a, 0xff, 0xff, 0x97, 0x5, 0x78, 0xc8, 0xfc,
    0xff, 0xff, 0xff, 0xff, 0xfa, 0x22, 0x2, 0xc4,
    0xff, 0xff, 0xb7, 0x3c, 0x9, 0x9e, 0xff, 0xff,
    0xff, 0xff, 0x89, 0x0, 0x0, 0x17, 0xd5, 0xff,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xac,
    0x3, 0x0, 0x0, 0x0, 0xe, 0x98, 0xfb, 0xff,
    0xff, 0xff, 0xff, 0xf0, 0x75, 0x1, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x15, 0x58, 0x76, 0x72,
    0x4c, 0xa, 0x0, 0x0, 0x0, 0x0,

    /* U+F2C8 "" */
    0x0, 0x0, 0x3, 0x60, 0xa9, 0xab, 0x64, 0x4,
    0x0, 0x0, 0x0, 0x0, 0x3, 0xb0, 0xff, 0xff,
    0xff, 0xff, 0xb7, 0x4, 0x0, 0x0, 0x0, 0x64,
    0xff, 0xda, 0x48, 0x43, 0xd3, 0xff, 0x6d, 0x0,
    0x0, 0x0, 0xaf, 0xff, 0x46, 0x0, 0x0, 0x37,
    0xff, 0xba, 0x0, 0x0, 0x0, 0xbf, 0xff, 0x24,
    0x0, 0x0, 0x14, 0xff, 0xcb, 0x0, 0x0, 0x0,
    0xc0, 0xff, 0x24, 0x73, 0x7c, 0x15, 0xff, 0xcc,
    0x0, 0x0, 0x0, 0xc0, 0xff, 0x54, 0xff, 0xff,
    0x54, 0xff, 0xcc, 0x0, 0x0, 0x0, 0xc0, 0xff,
    0x60, 0xff, 0xff, 0x60, 0xff, 0xcc, 0x0, 0x0,
    0x0, 0xc0, 0xff, 0x60, 0xff, 0xff, 0x60, 0xff,
    0xcc, 0x0, 0x0, 0x0, 0xc0, 0xff, 0x60, 0xff,
    0xff, 0x60, 0xff, 0xcc, 0x0, 0x0, 0x0, 0xc0,
    0xff, 0x60, 0xff, 0xff, 0x60, 0xff, 0xcc, 0x0,
    0x0, 0x0, 0xc0, 0xff, 0x60, 0xff, 0xff, 0x60,
    0xff, 0xcc, 0x0, 0x0, 0x11, 0xe7, 0xff, 0x5f,
    0xff, 0xff, 0x5f, 0xff, 0xed, 0x16, 0x0, 0x8c,
    0xff, 0xb1, 0x75, 0xff, 0xff, 0x83, 0xa0, 0xff,
    0x95, 0x0, 0xdf, 0xfd, 0x54, 0xfe, 0xff, 0xff,
    0xff, 0x5b, 0xfa, 0xe8, 0x0, 0xfa, 0xe5, 0x77,
    0xff, 0xff, 0xff, 0xff, 0x82, 0xdc, 0xff, 0x6,
    0xe6, 0xf9, 0x5b, 0xff, 0xff, 0xff, 0xff, 0x61,
    0xf8, 0xf3, 0x0, 0x9f, 0xff, 0x81, 0xa0, 0xff,
    0xff, 0xaa, 0x7f, 0xff, 0xac, 0x0, 0x23, 0xf2,
    0xff, 0x97, 0x54, 0x5c, 0x96, 0xfe, 0xf6, 0x2c,
    0x0, 0x0, 0x42, 0xef, 0xff, 0xff, 0xff, 0xff,
    0xf1, 0x49, 0x0, 0x0, 0x0, 0x0, 0x15, 0x79,
    0xac, 0xac, 0x7b, 0x17, 0x0, 0x0, 0x0
};


/*---------------------
 *  GLYPH DESCRIPTION
 *--------------------*/

static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
    {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
    {.bitmap_index = 0, .adv_w = 220, .box_w = 14, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
    {.bitmap_index = 294, .adv_w = 160, .box_w = 11, .box_h = 21, .ofs_x = 0, .ofs_y = -3}
};

/*---------------------
 *  CHARACTER MAPPING
 *--------------------*/

static const uint16_t unicode_list_0[] = {
    0x0, 0x285
};

/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
    {
        .range_start = 61507, .range_length = 646, .glyph_id_start = 1,
        .unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 2, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
    }
};



/*--------------------
 *  ALL CUSTOM DATA
 *--------------------*/

#if LVGL_VERSION_MAJOR == 8
/*Store all the custom data of the font*/
static  lv_font_fmt_txt_glyph_cache_t cache;
#endif

#if LVGL_VERSION_MAJOR >= 8
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
    .glyph_bitmap = glyph_bitmap,
    .glyph_dsc = glyph_dsc,
    .cmaps = cmaps,
    .kern_dsc = NULL,
    .kern_scale = 0,
    .cmap_num = 1,
    .bpp = 8,
    .kern_classes = 0,
    .bitmap_format = 0,
#if LVGL_VERSION_MAJOR == 8
    .cache = &cache
#endif
};



/*-----------------
 *  PUBLIC FONT
 *----------------*/

/*Initialize a public general font descriptor*/
#if LVGL_VERSION_MAJOR >= 8
const lv_font_t font_myawesome = {
#else
lv_font_t font_myawesome = {
#endif
    .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt,    /*Function pointer to get glyph's data*/
    .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt,    /*Function pointer to get glyph's bitmap*/
    .line_height = 21,          /*The maximum line height required by the font*/
    .base_line = 3,             /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
    .subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
    .underline_position = -7,
    .underline_thickness = 1,
#endif
    .dsc = &font_dsc,          /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
    .fallback = NULL,
    .user_data = NULL,
};



#endif /*#if FONT_MYAWESOME*/

